package com.yigang.entity;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * entity
 *
 * @author 陈佳祥
 */
public class ShoppingcartVO extends ProductVO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     *
     */
    private Integer productQuantity;
    /*
     *
     */
    private String id;
    /**
     *
     */
    private String shoppingcartId;

    private Double sumPrice;

    public Integer getProductQuantity() {
        return productQuantity;
    }

    public void setProductQuantity(Integer productQuantity) {
        this.productQuantity = productQuantity;
    }

    public String getShoppingcartId() {
        return shoppingcartId;
    }

    public void setShoppingcartId(String shoppingcartId) {
        this.shoppingcartId = shoppingcartId;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Double getSumPrice() {
        String colorPrice = getColorPrice().trim();
        if (colorPrice.startsWith("¥")) {
            String substring = colorPrice.substring(1, colorPrice.length());
            BigDecimal a1 = new BigDecimal(substring);
            BigDecimal aa = new BigDecimal(productQuantity.toString().trim());
            return a1.multiply(aa).doubleValue();
        }
        return null;
    }

    public void setSumPrice(Double sumPrice) {
        this.sumPrice = sumPrice;
    }
}

